import express from 'express';
import router from './routes/index';
import BodyParser from 'body-parser'


const app = express()

// app.use(express.json())
app.use(BodyParser.urlencoded({ extended: false }))
app.use(BodyParser.json())

const port = 8081

app.get('/pisiw',(req,res)=>{
  res.send('connection test')
})
// 启动
app.listen(port, async () => {
  console.log(`App is running at http://localhost:${port}`)
  app.use('/pisiw', router)
})


